/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ivanbiz.kelas;

import com.ivanbiz.account.Account;
import com.ivanbiz.generic.GenericDAOImpl;
import org.hibernate.Query;

/**
 *
 * @author User
 */
public class KelasDAOImpl extends GenericDAOImpl implements KelasDAO {

    public Kelas loadByAccountId(long id) throws Exception {
        Query query = getSessionFactory().getCurrentSession().createQuery("from Kelas a where a.account.id=:id");
        query.setParameter("id", id);
        return (Kelas) query.uniqueResult();
    }
}
